﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WindowsStateService.Data
{
    public class OverLimitData
    {
        /// <summary>
        /// 1:CpuUsage
        /// 2:CpuTemperature
        /// 3:UsedMemoryRatio
        /// 4:DiskUsage
        /// 5:DiskTemperature
        /// 6:MainBoardTemperature
        /// 7:FanSpeed
        /// 8:Net Status Changed info
        /// 9:Net received and send
        /// 10:Net send
        /// </summary>
        private int _data_type;
        private float _value;
        private DateTime _dateTime;
        private string _net_msg;
        private long send_bytes;
        private long received_bytes;

        public int Data_Type
        {
            get { return _data_type; }
            set { _data_type = value; }
        }

        public float Value
        {
            get { return _value; }
            set { _value = value; }
        }

        public DateTime Time 
        {  
            get { return _dateTime; }
            set { _dateTime = value; }
        }

        public string NetMsg
        {
            get { return _net_msg; }
            set { _net_msg = value; }   
        }

        public long SendBytes
        {
            get {return send_bytes; }
            set { send_bytes = value; }
        }

        public long ReceivedBytes
        {
            get { return received_bytes; }
            set { received_bytes = value; }
        }
        public OverLimitData()
        {
            _dateTime = DateTime.Now;
        }


        public OverLimitData(int data_type, float value) 
        {
            _dateTime = DateTime.Now;
            _data_type = data_type;
            _value = value;
        }

        public OverLimitData(string msg)
        {
            _dateTime = DateTime.Now;
            _data_type = 8;
            _net_msg = msg;
        }
    }
}
